import Vue from 'vue'
import Router from 'vue-router'
// import base from '@/components/base/base'
// import home from '@/components/home/home'
// import manage from '@/components/manage/manage'
// import goods from '@/components/manage/goods/goods'
// import setting from '@/components/manage/setting/setting'
const base = () => { import('@/components/base/base') }
const home = () => { import('@/components/home/home') }
const manage = () => { import('@/components/manage/manage') }
const goods = () => { import('@/components/goods/goods') }
const setting = () => { import('@/components/setting/setting') }

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'base',
      component: base,
      children: [
        {
          path: '/',
          name: 'home',
          component: home
        },
        {
          path: '/manage',
          name: 'manage',
          component: manage,
          children: [
            {
              path: 'goods',
              name: 'goods',
              component: goods
            },
            {
              path: 'setting',
              name: 'setting',
              component: setting
            }
          ]
        }
      ]
    }
  ]
})
